home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Libraries / GUSI 1.4.1 / GUSI / README < prev    next >
Encoding:
Text File  |  1994-05-03  |  14.2 KB  |  313 lines  |  [TEXT/MPS ]

  1.                  G U S I -- Grand Unified Socket Interface
  2.  
  3. INTRODUCTION
  4.  
  5. GUSI is an extension and partial replacement of the MPW C runtime library. Its
  6. main objective is to provide a more or less simple and consistent interface
  7. across the following communication domains:
  8.  
  9. Files                Ordinary Macintosh files and MPW pseudo devices.
  10. Unix                Memory based communication within a single machine.
  11. Appletalk        ADSP communication over a network.
  12. PPC                Connections with the System 7 PPC Toolbox.
  13. Internet            TCP and UDP connections over MacTCP.
  14. PAP                 Connections to PostScript printers.
  15.  
  16. Additionally, GUSI adds some UNIX library calls dealing with files which were
  17. missing, like chdir(), getcwd(), symlink(), and readlink(), and changes a few
  18. other library calls to behave more like their UNIX counterparts.
  19.  
  20. REQUIREMENTS
  21.  
  22. To use GUSI, you need MPW C 3.2 or later. To modify it, you additionally need MPW
  23. C++ 3.2 or later and Perl.
  24.  
  25. COPYING
  26.  
  27. Copyright © 1992-1994 Matthias Neeracher
  28.  
  29. Permission is granted to anyone to use this software for any purpose on any
  30. computer system, and to redistribute it freely, subject to the following
  31. restrictions:
  32.  
  33. - The author is not responsible for the consequences of use of this software,
  34.   no matter how awful, even if they arise from defects in it.
  35. - The origin of this software must not be misrepresented, either by explicit
  36.   claim or by omission.
  37. - Altered versions must be plainly marked as such, and must not be misrepresented
  38.   as being the original software.
  39.  
  40. WHERE TO BEGIN
  41.  
  42. You should probably start with printing out the documentation in GUSI.ps. Maybe
  43. it helps also to play with the sample programs.
  44.  
  45. BUGS, QUESTIONS, SUGGESTIONS
  46.  
  47. Please report any problems you experience with the code or the documentation to
  48. me. I'd also be interested in hearing about your success stories, if you have
  49. any.
  50.  
  51. MAILING LIST
  52.  
  53. There is now a mailing list for announcing new releases and discussions about 
  54. how to make GUSI change your life. To subscribe, send a mail to 
  55. <gusi-request@iis.ee.ethz.ch>
  56.  
  57. Matthias Neeracher                    Office:    +41 1 632 51 46
  58. Hohenklingenstrasse 19                Home:     +41 1 341 85 06
  59. 8049 Zuerich                            Email:    <neeri@iis.ee.ethz.ch>
  60. SWITZERLAND
  61.  
  62. RELEASE NOTES
  63.  
  64. Version 1.4.1    02May94
  65.  
  66. - Non-blocking sends on TCP sockets with large amounts of data would not do
  67.   anything [Benjamin Beberness].
  68.  
  69. Version 1.4.0    01May94
  70.  
  71. - Enabled recvfrom with non-NULL from addresses on all stream socket families
  72.   (returning getpeername()) to fix a problem with MacPerl [James Burgess, 
  73.   Asa Packer].
  74. - Attempting to write on half open sockets would still sometimes hang because of
  75.   the fflush() problem mentioned below. I had to extend the kludge to almost
  76.   all possible error codes [Asa Packer].
  77. - Permissions returned by stat() for locked files were wrong [John Kamp].
  78. - Implemented utime() as far as possible (i.e., for modification times, the
  79.   Mac has no concept of access times) [James Burgess].
  80. - Another round in my epic battle with rename(): This time, rename() resolved
  81.   aliases that should have been left unresolved [Maki Watanabe, Man Wei Tam].
  82. - Avoided calls to malloc() on system startup to circumvent problems with 
  83.   MacPerl memory allocation [Sal Gurnani, Torsten Ekedahl et al.].
  84. - Try to behave more sensibly when the other side closes a socket() 
  85.   [David Hansen].
  86. - getservbyname() would fail unless /etc/services was in the preferences folder
  87.   [Alasdair Rawsthorne].
  88. - Switched from Projector to RCS.
  89. - Tried to fix a compatibility problem with MPW 3.2
  90.  
  91. Version 1.3.6  22Feb94
  92.  
  93. - recvfrom wouldn't return the address of the sender [Michael Wu].
  94. - TFileSpec constructors now preserve case, (hopefully) making rename("a","A")
  95.   finally work [Maki Watanabe].
  96. - rename() is now able to rename locked files. This is an experimental feature
  97.   introduced to support RCS. It might go away again.
  98.   
  99. Version 1.3.5    11Jan94
  100.  
  101. - Made the semantics of select() conform more closely to their UN*X counter-
  102.   parts. In particular, if there is no more data to read/write, a socket is 
  103.   now flagged as ready to read/write. In the past, the exception flag was 
  104.   incorrectly used to signal error conditions.
  105. - EBADF is now treated the same way as ESHUTDOWN on write().
  106. - GUSI now handles more than _NFILE stdio FILEs [James Tisdall].
  107. - Fixed several bugs with default arguments and prompts for choose() with 
  108.   files [Maki Watanabe].
  109. - chdir() would ignore most errors [Peter Lewis].
  110.  
  111. Version 1.3.4    17Nov93
  112.  
  113. - Fixed a bug in GUSIBuffer which prevented PPC Toolbox sockets from receiving
  114.   more than about 2K of data before crashing.
  115. - fflush() in the MPW stdio library doesn't take no (or -1) for an answer, 
  116.   therefore quitting with unsent data in the stdio buffers would cause programs 
  117.   to hang. As a workaround, GUSI detects when write() is called twice in a row 
  118.   and ESHUTDOWN would have been returned both times. In this case, GUSI pretends
  119.   the write succeeded the second time.
  120. - The new version of rename introduced in 1.3.3 was buggy in several respects.
  121.   First of all, it would return EINVAL when the call actually had succeeded. 
  122.   Second, rename() was too naive to actually force the correct spelling.
  123.   rename("a", "A"), would work, rename("A", "A"), when the file was actually
  124.   spelled "a" would not.
  125. - rmdir() frivolously walked up a directory before deleting, which for some
  126.   strange reason sometimes actually worked.
  127. - readdir() would return ENOENT when the end of the directory was reached, 
  128.   which is contrary to the way UN*X does it.
  129. - GUSI would try to open all network services whose socket families were 
  130.   linked  in at a very early stage in the application. This would cause 
  131.   problems for SLIP/PPP (and probably also ARA) users, as for some applications 
  132.   (like MacPerl), starting up SLIP every time made little sense. Additionally, 
  133.   initializing MacTCP before the rest of the Toolbox would cause crashes with 
  134.   some SLIP implementations. The behaviour of GUSI has now changed so network
  135.   services are only initialized when the first socket is opened or another call 
  136.   necessitates it.
  137. - A new socket family has been added in GUSIRemoteConole.o, which is currently 
  138.   not documented, so using it is not recommended.
  139.  
  140. Version 1.3.3    24Oct93
  141.  
  142. - Added automatic centering to get directory dialog if rezzed for System 7 only.
  143. - Added a constructor for special files and folders to class TFileSpec.
  144. - Made rename("a", "A") possible.
  145. - Made TFileSpec and consequently GUSI file routines more robust against 
  146.   pathological paths. Path components longer than 63 chars used to trash 
  147.   memory.
  148.  
  149. Version 1.3.2    11Sep93
  150.  
  151. - In the absence of an /etc/services file, endservent() tried to fclose 
  152.   (FILE *) -1, with disastrous consequences. Thanks to Olafur Bragason for
  153.   reporting this bug.
  154. - Paul C. Aitkenhead discovered that accept() for TCP sockets didn't fill
  155.   in the name of the connecting peer. 
  156. - The tests will now initialize QuickDraw by themselves, to take into account
  157.   the fact that when using SIOW, WaitNextEvent might get called before SIOW has
  158.   a chance to initialize the Toolbox.
  159. - As Brad Pickering found out, sends for UDP sockets would by mistake never 
  160.   report errors.
  161.  
  162. Version 1.3.1  09Aug93
  163.  
  164. - Reid Simmons brought to my attention that gethostname() was no longer an
  165.   external symbol. On closer inspection, the same turned out to be true about 
  166.   truncate() and GUSIDefaultSpin(). I had made a few mistakes in my prototypes.
  167.   The new version of the Internalize script should catch this type of error in
  168.   the future.
  169.   
  170. Version 1.3.0    31Jul93
  171.  
  172. - Separated examples into their own folder with their own Makefile. Building
  173.   GUSITest will therefore no longer cause GUSI.o to be rebuilt.
  174. - The Makefile has been generally sanitized. 
  175. - All header files now reside in :includes
  176. - Most headers have changed in rather drastical ways. The BSD headers are now
  177.   taken from net2 and are prototyped. This is initially likely to produce a 
  178.   few errors in your code where typecasts have been missing. In particular, the
  179.   following have changed:
  180.    - bind, connect, accept, and getsockname take address parameters 
  181.       of type (struct sockaddr *).
  182.     - If you had declard any variables as (dirent *), you will have to change 
  183.       that to (struct dirent *).
  184. - The headers have also been adapted so that no symbol from the standard MPW 
  185.   headers is ever redefined in an incompatible way (hopefully).
  186. - getserv...() has been enhanced, thanks to code contributed by Sak Wathanasin.
  187.   The new implementation first searches for a file /etc/services in the 
  188.   preferences folder, before falling back on the old approach.
  189. - getservent(), setervent(), endservent(), getservbyport(), truncate(), 
  190.   ftruncate(), and scandir() were added.
  191. - stat() on a directory now returns the number of files in st_size. Needless to
  192.   say, this is totally nonportable.
  193. - Pathnames where an intermediate folder existed as a file didn't give the
  194.   errors they should have given.
  195. - Another UDP fix.
  196.  
  197. Version 1.2.0    20Jun93
  198.  
  199. - Fixed a disastrous bug with configuration resources. MPW Tools that had no 
  200.   configuration resources would "borrow" resources of other Tools previously
  201.   loaded.
  202. - It is now possible to make the type & creator of newly created file dependent
  203.   on their suffixes (i.e., anything ening in .o can be mapped to 'OBJ '/'MPS ')
  204. - If socket creation fails due to low memory conditions, errno is set correctly
  205. - Opening of the console is now handled more subtly, allowing programmers to link
  206.   GUSI with their custom "Dev:Console" handlers.
  207. - The routine for checking for Command-period is now exported
  208. - getsockname() for UDP sockets in an early stage of their existence would in 
  209.   some cases nonsense. Thanks to Paul C. Aitkenhead for discovering.
  210. - Changed sa_constr_ppc. The old version was basically unable to provide a real
  211.   constraint. Hopefully, though, old sa_constr_ppc records are still handled
  212.   correctly.
  213. - Bracketed all headers defining prototypes with #ifdef __cplusplus 
  214.   incantations. Thanks to John W. Pope for suggesting this.
  215.   
  216. Version 1.1.1    04Apr93
  217.  
  218. - A few of the declarations in sys/fcntl.h were inconsistent with Fcntl.h and 
  219.   the actual behaviour of GUSI, in particular O_CREATE. (thanks to Franklin Chen 
  220.   for reporting).
  221. - PAP sockets would lose data when closed.
  222.  
  223. Version 1.1.0    14Mar93
  224.  
  225. - Reorganized the way to specify parts of GUSI to include. There are no 
  226.   specialized builds like GUSI_AFU.o anymore. Instead, you specify one or several 
  227.   configuration files in addition to GUSI.o in the link. If you just want to 
  228.   include everything possible, use {CLibraries}GUSI_Everything.cfg.
  229. - Added support for the Printer Access Protocol (PAP): You can open a connection
  230.   to the currently chosen LaserWriter with open("Dev:Printer").
  231. - Added support for Dave Peterson's forthcoming inetd.
  232. - Introduced fgetfileinfo().
  233. - All header files are now protected against multiple inclusion, as suggested by
  234.   J.T. Conklin.
  235. - st_nlink in statbufs used to return 1 for both files and folders. While it 
  236.   might be argued that this is true, it breaks some Unix programs. Therefore, 
  237.   the current version returns for folders either the number of items the folder 
  238.   contains + 2 or the number of subdirectories the folder contains + 2 (the 2 is 
  239.   an Unixism), depending on a flag in the configuration resource (thanks to 
  240.   Charlie Reiman for reporting).
  241. - fstat() used to claim that sockets were regular files. This bug had horrible 
  242.   consequences for some Unix software. Now, they correctly declare sockets to be
  243.   such.
  244. - Use FSpMakeFSSpec at some places in TFileSpec if it's available. Added a member
  245.   function Bless() to guarantee the kosherness of a TFileSpec.
  246. - Found a few severe bugs in GUSIBuffer. PPC sockets might work better now.
  247. - Added several new options to the preference resource. To specify which version 
  248.   of the preference resource you want, #define GUSI_PREF_VERSION to the version 
  249.   you want. If you don't, version '0102' is assumed.
  250. - To faciliate changing flags on the fly, programs rezzed with GUSI.r now include
  251.   a TMPL for the version resource.
  252.  
  253. Version 1.0.2    24Jan93
  254.  
  255. - rename() used to sometimes do the wrong thing if both the name and the folder 
  256.   had to be changed. I don't think the new version is 100% correct, but it 
  257.   should be better. (thanks to Brad Pickering for reporting)
  258. - choose() for files doesn't count the terminating NULL byte anymore. I hope 
  259.   nobody relied on the old version. (thanks again to Brad Pickering)
  260. - getserv...() and getprotoby...() used to return NULL for the aliases field, 
  261.   which is not correct.
  262. - TCP/IP sockets had a horrible bug with fast read/writes. That's what I get for
  263.   not doing my code stealing properly.
  264.  
  265. Version 1.0.1    09Jan93
  266.  
  267. - If a TCP socket returned from accept() was closed, further accepts on the
  268.   parent socket were disabled. Fixed. Thanks to Chen JiaTyan for reporting.
  269. - GUSI configuration resources are now respected
  270. - Programs linked with GUSI now by default automatically call the spin routine
  271.   for every read/write (This can be turned off in the configuration resource).
  272. - Add a chdir()-respecting fsetfileinfo()
  273.  
  274. Version 1.0        20Dec92
  275.  
  276. - Changed the way subset libraries were built.
  277. - Arrange for the GUSI_F variant to be always built.
  278. - Add routines to access FSSpec manipulations from plain C.
  279. - Add correct prototypes to netdb.h.
  280. - Rename GUSIFSp_P.h to TFileSpec.h and make it public.
  281. - Let choose() treat flags consistently for all address families: If CHOOSE_NEW
  282.   or CHOOSE_DIR are specified for a family that doesn't support them, EINVAL
  283.   is returned.
  284. - FileSocketDomain::choose() now treats CHOOSE_DEFAULT correctly
  285. - Add getcwd()
  286. - stat() now considers files with type 'TEXT' as executable (this is certainly
  287.   controversial and might be made configurable in a future version).
  288. - removed GUSIResident, the feature from hell. I forgot twice to specify
  289.   a resident segment for it, and both times it took me almost a week to find
  290.   the bug. The routines formerly in GUSIResident are now in Main.
  291. - fixed a few bugs.
  292. - Updated the documentation.
  293.  
  294. Version 1.0b4    29Oct92
  295.  
  296. Purged (hopefully) the last remaining traces of the obsolete structure name
  297. "direct" (should have been "dirent"). Thanks to Kevin Willey for pointing out
  298. that bug.
  299.  
  300. Version 1.0b3    19Oct92
  301.  
  302. Fixed a few bugs in the test programs
  303.  
  304. Version 1.0b2    05Oct92
  305.  
  306. The documentation is now almost complete.
  307.  
  308. Version 1.0b1    28Sep92
  309.  
  310. This release is somewhat premature. Although I believe the code is already in a
  311. decent shape, the documentation is still in a bad shape. I wouldn't trust the PPC
  312. Toolbox code too much yet.
  313.